﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BDGetQuote.Web.Models
{
    public class DeletedManufacturerByCustomerRepository: IDeletedManufacturerByCustomerRepository
    {

        public long Add(string userId, int manufacturerId)
        {
            using (var _dbcontext = new BDQuoteDBDataContext())
            {
                var _item = new BO_DeletedManufacturerByCustomer()
                {
                    UserId = userId,
                    ManufacturerId = manufacturerId,
                    DeletedDate = DateTime.Now
                };
                _dbcontext.BO_DeletedManufacturerByCustomers.InsertOnSubmit(_item);
                _dbcontext.SubmitChanges();
                return _item.ManufacturerId;
            }
        }
    }
}